Range

Function

This API is used to get the parameter range of Network > Network Configuration > Network Base.

Request Message

Parameter Description

Table 11
ParameterRangeTypeDescription
page_type"net_general"stringstring length:0-16

Sample

POST /API/NetworkConfig/NetBase/Get HTTP/1.1
{
    "version": "1.0",
    "data": {"page_type": "net_general"}
}

Response Message

Parameter Description

Table 1
ParameterRangeTypeDescription
wanJSON objectSingle JSON,see Table 2 for more information
lanJSON objectSingle JSON,see Table 3 for more information(NVR exclusive)
pppoeJSON objectSingle JSON,see Table 4 for more information
3gJSON objectSingle JSON,see Table 5 for more information
wifiJSON objectSingle JSON,see Table 6 for more information
portJSON objectSingle JSON,see Table 7 for more information
extern_ipstringExternal network IP, valid when external network is enabled
p2p_switchboolP2P function switch
ipeye_switchboolIPEYE switch(DVR、NVR exclusive)
device_instruction“nvr”“xvr” “dvr” “ipc”stringDevice type description flag
web_compatibilityboolWeb Compatibility mode switch
toeboolSwitch mode(NVR exclusive)
video_encrypt_transfer“CH1”…”CH1x”
“IP_CH1”…”
IP_CH1x”
“WIFI_CH1”…”
WIFI_CH1x”
The number of channels depends on the functionality of the device
arrayVideo encryption transmission channel
Each array bit represents a channel with a string.
lan1JSON ObjectSingle JSON,see Table 8 for more information(Using in new network card mode)
lan2JSON ObjectSingle JSON,see Table 9 for more information(Using in new network card mode)
poeJSON ObjectSingle JSON,see Table 10 for more information(Using in new network card mode)
net_card_mode"Single Address Mode" ,
"Double Address Mode"
sring arrayNetwork card mode
default_route"WAN"
" LAN1", "LAN2"
string arrayDefault route(Using in new network card mode)
net_car_select"WAN"
" LAN1", "LAN2"
string arrayNetwork card selection(Using in new network card mode)
pppoe_net_card"LAN1", "LAN2"string arrayPPPOE Network card selection(Using in new network card mode)
dns1stringPreferred DNS Server, sample:8.8.8.8(Using in new network card mode)
dns2stringAlternate DNS server, sample:8.8.8.8(Using in new network card mode)
operation_type"LanModify"
"PoeModify"
stringExample Change the type of a network parameter.
manual_ip_conflictboolManual IP conflict
Table 2
ParameterRangeTypeDescription
dhcpboolDHCP function switch
ip_addressstringIP address,sample:192.168.1.24
subnet_maskstringsubnet mask,sample:255.255.255.0
gatewaystringgateway,sample:192.168.1.1
ipv6_addressstringIPv6 address
ipv6_prefixlenint
ipv6_gatewaystringIPv6 gateway
dns1stringPreferred DNS Server,sample:8.8.8.8
dns2stringAlternate DNS server,sample:8.8.8.8
ipv6_dns1stringipv6 Preferred DNS Server, sample:8.8.8.8
ipv6_dns2stringipv6 Alternate DNS server, sample:8.8.8.8
main_multicast_enableboolMain stream multicast switch(IPC exclusive)
main_multicast_address(224.0.0.0-239.255.255.255)stringMain stream multicast address(IPC exclusive)
main_multicast_port1024-65535intMain stream multicast port(IPC exclusive)
sub_multicast_enableboolSubcode Stream Multicast switch(IPC exclusive)
sub_multicast_address(224.0.0.0-239.255.255.255)stringSubcode Stream Multicast Address(IPC only)
dhcp_enableboolThe Dhcp enable switch does not enable the DHCP switch after enabling PPPOE(NVR exclusive)
rtsp_urlstringThe URL format when using the rtsp server(NVR、DVR exclusive)
encryptionboolvideo encryption
connection_protocol"svnp"
"onvif"
stringConnection protocol
Table 3
ParameterRangeTypeDescription
ip_addressstringSwitch IP address
subnet_maskstringSwitch subnet mask
modify_field"ip_address"
"subnet_mask"
stringThe specific parameter to be modified. This field is required only with operation_type.
show_tipsboolWhether a prompt is required. The response needs to include this field only if the request has operation_type on it.
Table 4
ParameterRangeTypeDescription
enableboolPPoE function switch
usernameMax length: 35bytestringPPPoE user name
passwordMax length: 35bytestringPPPoE password
password_emptyboolIs the password empty
ip_addressstringIP address,sample:192.168.1.24
subnet_maskstringsubnet mask,sample:8.8.8.8
gatewaystringdefault gateway,sample:192.168.1.1
dns1stringPreferred DNS Server,sample:8.8.8.8
dns2stringAlternate DNS server,sample:8.8.8.8
pppoenewstructboolWhether to use two sets of range control
base_enc_passwordJson Objectencrypted password,see base_secondary_authentication for more information
Table 5
ParameterRangeTypeDescription
enablebool3G network function switch
apnMax length: 35bytestring3G apn
dial_codeMax length: 35bytestring3G DialCode
usenameMax length: 35bytestring3G user name
passwordMax length: 335bytestring3G password
ip_addressstringIP address,sample:192.168.1.24
subnet_maskstringsubnet mask,sample:8.8.8.8
gatewaystringdefault gateway,sample:192.168.1.1
dns1stringPreferred DNS Server,sample:8.8.8.8
dns2stringAlternate DNS server,sample:8.8.8.8
base_enc_passwordJson Objectencrypted password,base_secondary_authentication
Table 6
ParameterRangeTypeDescription
enableboolWIFI function switch
ssidMax length: 35bytestringWIFISSID
passwordMax length: 35bytestringWIFI password
ip_addressstringIP address obtained by connecting to WIFI(Get only)
status"Unconnected"
"Connected"
stringWIFI connection status(Get only)
wifi_type"MT7601"
"WN650BT"
stringWIFI connection type
network_mode_type"Dhcp"
"Static"
stringWIFI mode
base_enc_passwordJson Objectencrypted password,see base_secondary_authentication for more information
Table 7
ParameterRangeTypeDescription
service“Web”, “Client”,
“Rtsp”, “Https”,
stringport type
protocol"TCP"stringprotocol type(Get only)
internal[1~65535]intInternal port number
external_port[1~65535]intexternal port number
upnp_status"Inactive"
"Active"
stringPort UPnP function status(Get only)
upnpboolEnable UPnP function on the port
maping_strategy"Manual""Auto"stringMapping method
Table 8
ParameterRangeTypeDescription
dhcpboolIpv4 DHCP function switch
ip_addressstringIP address,sample:192.168.1.24
subnet_maskstringsubnet mask,sample:255.255.255.0
gatewaystringdefault gateway,sample:192.168.1.1
dhcpv6boolIPv6 DHCP function switch
ipv6_addressstringIPv6 address
ipv6_prefixlenint
ipv6_gatewaystringIPv6 gateway
dhcp_enableboolDhcp enable switch,DHCP switch not enabled after enabling PPPOE(NVR exclusive)
mac_addressstringphysical address,sample:88-60-50-4E-87-29
Table 9
ParameterRangeTypeDescription
dhcpboolIpv4 DHCP function switch
ip_addressstringIP address,sample:192.168.1.24
subnet_maskstringsubnet mask,sample:255.255.255.0
gatewaystringdefalt gateway,sample:192.168.1.1
dhcpv6boolIPv6 DHCP function switch
ipv6_addressstringIPv6 address
ipv6_prefixlenint
ipv6_gatewaystringIPv6 gateway
mac_addressstringphysical address,sample:88-60-50-4E-87-29
Table 10
ParameterRangeTypedescription
poedhcpboolPoe DHCP function
poe_ip_addressstringPOE Ip address,sample:192.168.1.24
poe_sunnet_maskstringPOE subnet mask,sample:255.255.255.0
modify_field"poe_ip_address"
"poe_subnet_mask"
stringThe specific parameter to be modified. This field is required only with operation_type
show_tipsboolWhether a prompt is required. The response needs to include this field only if the request has operation_type on it

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {
        "wan": {
            "type": "object",
            "items": {
                "dhcp": {"type": "bool"},
                "ip_address": {
                    "type": "string",
                    "min_len": 7,
                    "max_len": 15
                },
                "subnet_mask": {
                    "type": "string",
                    "min_len": 7,
                    "max_len": 15
                },
                "gateway": {
                    "type": "string",
                    "min_len": 7,
                    "max_len": 15
                },
                "ipv6_address": {
                    "type": "string",
                    "min_len": 0,
                    "max_len": 46
                },
                "ipv6_prefixlen": {
                    "type": "int32",
                    "min": 1,
                    "max": 128,
                    "default_value": 64
                },
                "ipv6_gateway": {
                    "type": "string",
                    "min_len": 0,
                    "max_len": 46
                },
                "dns1": {
                    "type": "string",
                    "min_len": 7,
                    "max_len": 15
                },
                "dns2": {
                    "type": "string",
                    "min_len": 0,
                    "max_len": 15
                },
                "dhcp_enable": {"type": "bool"}
            }
        },
        "lan": {
            "type": "object",
            "items": {
                "poedhcp": {"type": "bool"},
                "ip_address": {
                    "type": "string",
                    "min_len": 7,
                    "max_len": 15
                },
                "subnet_mask": {
                    "type": "string",
                    "min_len": 7,
                    "max_len": 15
                }
            }
        },
        "pppoe": {
            "type": "object",
            "items": {
                "enable": {"type": "bool"},
                "username": {
                    "description": "Each range {min_len,max_len} corresponds to one enable state [false,true].",
                    "type": "string",
                    "mode": "rw",
                    "ranges": [
                        {
                            "min_len": 0,
                            "max_len": 35
                        },
                        {
                            "min_len": 1,
                            "max_len": 35
                        }
                    ]
                },
                "password": {
                    "description": "Each range {min_len,max_len} corresponds to one enable state [false,true].",
                    "type": "string",
                    "mode": "rw",
                    "ranges": [
                        {
                            "min_len": 0,
                            "max_len": 35
                        },
                        {
                            "min_len": 1,
                            "max_len": 35
                        }
                    ]
                },
                "pppoenewstruct": {"type": "bool"},
                "password_empty": {"type": "bool"},
                "ip_address": {
                    "type": "string",
                    "min_len": 7,
                    "max_len": 15
                },
                "subnet_mask": {
                    "type": "string",
                    "min_len": 7,
                    "max_len": 15
                },
                "gateway": {
                    "type": "string",
                    "min_len": 7,
                    "max_len": 15
                },
                "dns1": {
                    "type": "string",
                    "min_len": 7,
                    "max_len": 15
                },
                "dns2": {
                    "type": "string",
                    "min_len": 0,
                    "max_len": 15
                }
            }
        },
        "port": {
            "type": "array",
            "min_size": 0,
            "max_size": 2,
            "items": [
                {
                    "service": "Web",
                    "protocol": {
                        "type": "string",
                        "mode": "r",
                        "items": ["TCP"]
                    },
                    "internal_port": {
                        "type": "int32",
                        "mode": "r",
                        "min": 1,
                        "max": 65535,
                        "default_value": 80
                    },
                    "external_port": {
                        "type": "int32",
                        "mode": "r",
                        "min": 1,
                        "max": 65535,
                        "default_value": 80
                    },
                    "upnp_status": {
                        "type": "string",
                        "mode": "r",
                        "items": [
                            "Inactive",
                            "Active"
                        ]
                    },
                    "maping_strategy": {
                        "type": "string",
                        "items": [
                            "Manual",
                            "Auto"
                        ]
                    },
                    "upnp": {"type": "bool"}
                },
                {
                    "service": "Client",
                    "protocol": {
                        "type": "string",
                        "mode": "r",
                        "items": ["TCP"]
                    },
                    "internal_port": {
                        "type": "int32",
                        "mode": "r",
                        "min": 1,
                        "max": 65535,
                        "default_value": 9000
                    },
                    "external_port": {
                        "type": "int32",
                        "mode": "r",
                        "min": 1,
                        "max": 65535,
                        "default_value": 9000
                    },
                    "upnp_status": {
                        "type": "string",
                        "mode": "r",
                        "items": [
                            "Inactive",
                            "Active"
                        ]
                    },
                    "maping_strategy": {
                        "type": "string",
                        "items": [
                            "Manual",
                            "Auto"
                        ]
                    },
                    "upnp": {"type": "bool"}
                }
            ]
        },
        "extern_ip": {
            "type": "string",
            "mode": "r",
            "min_len": 0,
            "max_len": 15
        },
        "p2p_switch": {"type": "bool"},
        "device_instruction": {
            "type": "string",
            "items": [
                "nvr",
                "xvr",
                "dvr"
            ]
        },
        "web_compatibility_mode": {"type": "bool"},
        "video_encrypt_transfer": {
            "type": "array",
            "min_size": 0,
            "max_size": 16,
            "items": {
                "type": "string",
                "items": [
                    "CH1",
                    "CH2",
                    "CH3",
                    "CH4",
                    "CH5",
                    "CH6",
                    "CH7",
                    "CH8",
                    "CH9",
                    "CH10",
                    "CH11",
                    "CH12",
                    "CH13",
                    "CH14",
                    "CH15",
                    "CH16"
                ]
            }
        },
        "forward_port": {"type": "bool"},
        "rtsp_url": {
            "type": "string",
            "min_len": 0,
            "max_len": 64
        }
    }
}

Error Code

See Response Messages Body and Common error_code for more information.